﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PServiceBus.Core.Interface;

namespace PServiceBus.Services.Gateway.Runtime {
    public class Transport {
        public static ITransport New<TTransport>(Action<TTransport> action) where TTransport : ITransport {
            var transport = Activator.CreateInstance<TTransport>();
            if(action != null) action(transport);
            return transport;
        }
    }
}
